#include <stdio.h>

int cnt1 = 0;
int cnt2 = 0;

void printd(int n)
{
    if(n < 0){
        putchar('-');
        n = -n;
    }
    if(n / 10){
        cnt1++;
        printf("enter %d, n=%d\n", cnt1, n);
        printd(n / 10);
        cnt2++;
        printf("exit %d, n=%d\n", cnt2, n);
    }
    printf("execute: ");
    putchar(n % 10 + '0');
    printf("\n");
}

int sum1ton(int n)
{
    if(n == 1){
        return 1;
    }else{
        return sum1ton(n - 1) + n;
    }
}

int main()
{
    //printd(123456);
    printf("sum = %d", sum1ton(10));
    return 0;
}